#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>

int narcissus(int ele)
{
	int tmp = ele;
	int g = 0, s = 0, b = 0;
	g = tmp % 10;
	s = tmp / 10 % 10;
	b = tmp / 100;
	if (g * g * g + s * s * s + b * b * b == ele)
		return 1;
	else
		return 0;
}

int main()
{
	int m, n;
	while (scanf("%d %d", &m, &n) != EOF)
	{
		int f = 0;
		int flag = 0;
		int i;
		for (i = m; i <= n; i++)
		{
			f = narcissus(i);
			if (f)
			{
				printf("%d ", i);
				flag = 1;
			}
		}
		if (!flag)
			printf("no");
		printf("\n");
	}
	return 0;
}